<?php
//PingBuWang.Com
//Copyright (c) 2017~2099 http://www.pingbuwang.com All rights reserved.
namespace app\user;
use think\template\TagLib;
use mip\Paginationm;
class Mipuser extends TagLib {
    
    protected $tags   =  [
        'group_list'      => ['attr' => 'orderBy,order,value,key', 'close' => 1],
    ];

    public function tagGroup_list($tag, $content)
    {
        $orderBy = !empty($tag['orderBy']) ? $tag['orderBy'] : 'sort';
        $order   = !empty($tag['order'])   ? $tag['order'] : 'asc';

        $value = isset($tag['value']) ? $tag['value'] : 'v';
        $key   = isset($tag['key'])   ? $tag['key'] : 'i';

        $html  = '<?php ';
        $html .= '$users_group_list = db("users_group")->order("'.$orderBy.' '.$order.'")->select();';
        $html .= ' ?>';
        $html .= '{volist name="users_group_list" id="' . $value . '" key="' . $key . '"}';
        $html .= $content;
        $html .= '{/volist}';
        return $html;


    }


     
}
